﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Orange.Lib.Effective
{
    public class Box<T>
    {
        private T t;

        private decimal amount;

        public decimal Amount
        {
            get { return amount; }
            set { amount = value; }
        }


        public void Add(T t)
        {
            this.t = t;
        }

        public void Inspect<U>(U u)
        {
            Console.WriteLine("T: {0}\nU:{1}", typeof(T).Name, typeof(U).Name);
        }

        public void FillBox<U>(U u, List<Box<U>> boxs)
        {
            foreach (var box in boxs)
            {
                box.Add(u);
            }
        }
    }
}
